Declare random item correctly in stresstest-toolbar
authorChristian Dywan <christian@twotoasts.de>
Fri, 23 Apr 2010 16:07:21 +0000 (18:07 +0200)
committerJavier Jardón <jjardon@gnome.org>
Sun, 2 May 2010 23:51:23 +0000 (01:51 +0200)
tests/stresstest-toolbar.c

index 7267981d8f12dac15f2eef29c765992fe37acca0..539e6de83b4022d85a20cc667704dc5138d8dc1d 100644 (file)
@@ -35,18 +35,18 @@ add_random (GtkToolbar *toolbar, gint n)
   gint position;
   gchar *label = g_strdup_printf ("Button %d", n);
 
-  GtkWidget *widget = gtk_tool_button_new (NULL, label);
-  gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (widget), "Bar");
+  GtkToolItem *toolitem = gtk_tool_button_new (NULL, label);
+  gtk_tool_item_set_tooltip_text (toolitem, "Bar");
 
   g_free (label);
-  gtk_widget_show_all (widget);
+  gtk_widget_show_all (GTK_WIDGET (toolitem));
 
   if (g_list_length (toolbar->children) == 0)
     position = 0;
   else
     position = g_random_int_range (0, g_list_length (toolbar->children));
 
-  gtk_toolbar_insert (toolbar, widget, position);
+  gtk_toolbar_insert (toolbar, toolitem, position);
 }
 
 static void